namespace EFBasic.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class db : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.UserTPTs",
                c => new
                    {
                        UserId = c.Int(nullable: false, identity: true),
                        FirstName = c.String(),
                        LastName = c.String(),
                    })
                .PrimaryKey(t => t.UserId);
            
            CreateTable(
                "dbo.FeaturedUsersTPT",
                c => new
                    {
                        UserId = c.Int(nullable: false),
                        IsFeatured = c.Boolean(nullable: false),
                        SubscriptionDate = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.UserId)
                .ForeignKey("dbo.UserTPTs", t => t.UserId)
                .Index(t => t.UserId);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.FeaturedUsersTPT", "UserId", "dbo.UserTPTs");
            DropIndex("dbo.FeaturedUsersTPT", new[] { "UserId" });
            DropTable("dbo.FeaturedUsersTPT");
            DropTable("dbo.UserTPTs");
        }
    }
}
